package com.aqiang.day0528_shop.main.model

import com.aqiang.day0528_shop.main.api.MainApi
import com.aqiang.day0528_shop.main.contract.SearchGoodsContract
import com.aqiang.day0528_shop.main.entity.BaseEntity
import com.aqiang.day0528_shop.main.entity.SearchGoodsEntity
import com.aqiang.lib_core.net.RetrofitManage
import kotlinx.coroutines.Deferred

class SearchGoodsModel : SearchGoodsContract.SearchGoodsModel {
    override fun searchGoods(keyWork: String,id:Int): Deferred<BaseEntity<List<SearchGoodsEntity>>> {
        return RetrofitManage.create(MainApi::class.java).searchGoods(keyWork,id,0,20)
    }
}